/**
 * @Author: yy
 * @Date: 2019/6/20
 * @Last Modified by: huanghuan
 * @Last Modified time: 2019-12-12 19:49:56
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';
// 查询列表
export const queryBaseList = params => axios.get(`${SERVER.CYXDMS_CLUE}/clueauditDisc/getAuditDistsList`, { params });
// 明细
export const getBaseInfoById = (id, potentialCustomersId, clueType) => axios.get(`${SERVER.CYXDMS_CLUE}/clueauditDisc/auditDistPotentialDetail?actionId=${id}&potentialCustomersId=${potentialCustomersId}&clueType=${clueType}`,{ id: Number(id) });
// 联系人列表
export const getBaseContactList = id => axios.get(`${SERVER.CYXDMS_CLUE}/clueauditDisc/getPlateDistList?potentialCustomerId=${id}`, { id: Number(id) });
// 新增联系人
export const addBaseContact = params => axios.post(`${SERVER.CYXDMS_CLUE}/clueauditDisc/addPlateDistContactinfo`, params);
// 编辑联系人
export const editBaseContact = params => axios.post(`${SERVER.CYXDMS_CLUE}/clueauditDisc/setPlateDistContactinfo`, params);
// 删除联系人
export const deleteBaseContact = id => axios.get(`${SERVER.CYXDMS_CLUE}/clueauditDisc/deletePlateDistContactinfo?contactId=${id}`, { id: Number(id) });
// 再分配
export const redistributionIds = id => axios.post(`${SERVER.CYXDMS_CLUE}/clueauditDisc/setDistributionAuditDists`, { id: Number(id)} );
//基盘明细
export const auditDistPotentialDetail = (id, potentialCustomersId,customerBusinessId) => axios.get(`${SERVER.CYXDMS_CLUE}/clueauditDisc/auditDistPotentialDetail?actionId=${id}&potentialCustomersId=${potentialCustomersId}&customerBusinessId=${customerBusinessId}`);

//已介绍客户
export const getRelateAuditDistList = (clueType, potentialCustomersId) => axios.get(`${SERVER.CYXDMS_CLUE}/clueauditDisc/getRelateAuditDistList?clueType=${clueType}&potentialCustomersId=${potentialCustomersId}`);


//  查询线索信息
// export const queryPotenCusManage = params => axios.get(`${SERVER.CYXDMS_CLUE}/clue/clueMarkftinhView`, { params });
